package com.kailong.config;

import com.kailong.util.SnowFlakeIdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * created by kailong on 2025/8/12
 */
@Configuration
public class SnowFlakeConfig {

    @Bean
    public SnowFlakeIdWorker snowFlakeIdWorker() {
        // 使用默认的workerId和dataCenterId，实际项目中可以根据需要进行配置
        return new SnowFlakeIdWorker(1L, 1L);
    }
}
